Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect F5 Big-IPs as platform bigip #1035

Merged
merged 2 commits into from
Jul 19, 2017
Merged

Detect F5 Big-IPs as platform bigip #1035

merged 2 commits into from
Jul 19, 2017

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Jul 19, 2017

They're RHEL + a bunch of secret sauce. Put them in the RHEL platform family, detect the platform properly, and parse the platform version so it doesn't get the RHEL platform version instead.

Signed-off-by: Tim Smith [email protected]

They're RHEL + a bunch of secret sauce. Put them in the RHEL platform family, detect the platform properly, and parse the platform version so it doesn't get the RHEL platform version instead.

Signed-off-by: Tim Smith <[email protected]>
@lamont-granquist
Copy link
Contributor

angrysauce CI tests

@tas50
Copy link
Contributor Author

tas50 commented Jul 19, 2017

Oh I knew that would blow up. If there's no objections to this PR I'll go fix the specs

def bigip_version
release_contents = File.read("/etc/f5-release")
release_contents.match(/BIG-IP release (\S*)/)[1] # http://rubular.com/r/O8nlrBVqSb
rescue NoMethodError, Errno::ENOENT, Errno::EACCES # rescue regex failure, file missing, or permission denied
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An explanation since it took me a moment: The NoMethodError catches the regex failure because String#match returns nil if there was no match and [] isn't a method on nil.

Copy link
Contributor

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It appears you have a billion mocks to update.

@stevendanna
Copy link
Contributor

Or just 1! :D

@tas50 tas50 merged commit ae215e6 into master Jul 19, 2017
@tas50 tas50 deleted the f5 branch January 30, 2018 00:44
@chef chef locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants